In the early days computers had only one processor that was capable of executing sequential programs. When a new processor was manufactured it usually was faster. This was achieved by raising the clock frequency of the processor so that it was capable of executing more instructions per second. Another important way was to optimize the instruction set of the processor so that the instructions would require less clock cycles to execute. However, this was soon recognized inadequate because of the increase in the computing needs.
This problem has been approached by introducing parallel computing environments. There are several different approaches. The traditional ones include having multiple processors within one computer and computing networks having multiple computing nodes. Lately new processors having multiple computing units within one processor have been introduced. One computing unit might be capable of executing several instructions concurrently. By combining these, one can construct a computing network in which the node computers comprise a plurality of processors that are capable of executing multiple instructions concurrently. A node computer can execute tens of instructions concurrently and this number is expected to be rising in the future. The biggest computing networks comprise thousands of computers. Thus, the computing networks might be able to execute more than tens of thousands of instructions concurrently.
To allow an efficient parallel execution of instructions, the programs of such computers must be designed to be executed in parallel. There are two different traditional solutions to overcome this problem. It is possible to parallelize a sequential program automatically while compiling. The better solution is that the programmer designs the program so that it actually comprises a plurality of sequential programs that can communicate with each other so that the actual task will be executed in parallel. However, even in this case the sequential programs are sequential and they must be further parallelized for obtaining the best possible result.
An example of an automatic parallelization is disclosed, for example, in U.S. Pat. No. 6,622,302. The drawback of this solution is that the parallelization of a sequential program is a very difficult task. Thus, it is time and resource consuming and still it is impossible to reach the perfect solution. Because of this, the automatic parallelization and other automatic optimization are trade-offs between the code quality and the use of resources.
Examples of traditional concurrent programming in which a plurality of sequential programs are used, can be found, for example, from the book “Concurrent programming: principles and practice” written by Gregory R. Andrews and published by Addison-Wesley in 1991. The drawback of this method is that the design process of the program is more complicated and time consuming and it requires special knowledge.
These methods can be combined. An example of this has been disclosed in U.S. Pat. No. 6,993,753. However, the combination does not solve the fundamental problems of these methods.